package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购订单实体类
 */
public class PurchaseOrderBean {
    /**采购订单编号*/
    private int id;
    /**供应商名称*/
    private String supplierName;
    /**采购人姓名*/
    private String purchaseName;
    /**采购日期*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createDate = LocalDate.now();
    /**采购详情集合*/
    private List<PurchaseInfoBean> purchaseInfoList;

    public PurchaseOrderBean() {
    }

    public PurchaseOrderBean(String supplierName, String purchaseName) {
        this.supplierName = supplierName;
        this.purchaseName = purchaseName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getPurchaseName() {
        return purchaseName;
    }

    public void setPurchaseName(String purchaseName) {
        this.purchaseName = purchaseName;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public List<PurchaseInfoBean> getPurchaseInfoList() {
        return purchaseInfoList;
    }

    public void setPurchaseInfoList(List<PurchaseInfoBean> purchaseInfoList) {
        this.purchaseInfoList = purchaseInfoList;
    }

    @Override
    public String toString() {
        return "PurchaseOrderBean{" +
                "id=" + id +
                ", supplierName='" + supplierName + '\'' +
                ", purchaseName='" + purchaseName + '\'' +
                ", createDate=" + createDate +
                ", purchaseInfoList=" + purchaseInfoList +
                '}';
    }
}
